﻿using Feature.YiGuo.Framework.Cache.Redis;
using System;
using System.Threading.Tasks;

namespace RedisTestConsoleApplication4
{
    class Program
    {
        private static ICacheManager cacheManager = CacheAdapter.GetContainer("APP.Test");
        private static string key = "stock";
        static void Main(string[] args)
        {
            for (int i = 0; i < 5000; i++)
            {
                Task.Factory.StartNew(Test);
            }
            Console.WriteLine("执行完毕");
            Console.Read();
        }

        private static void Test()
        {
            cacheManager.DecrementValue(key);
        }
    }
}
